function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(S,e){"use strict";function m(e,t,o){var n,i,r=(o=o||xe).createElement("script");if(r.text=e,t)for(n in _e)(i=t[n]||t.getAttribute&&t.getAttribute(n))&&r.setAttribute(n,i);o.head.appendChild(r).parentNode.removeChild(r)}function b(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?he[pe.call(e)]||"object":typeof e}function l(e){var t=!!e&&"length"in e&&e.length,o=b(e);return!we(e)&&!ge(e)&&("array"===o||0===t||"number"==typeof t&&0k.cacheLength&&delete o[n.shift()],o[e+" "]=t}var n=[];return o}function a(e){return e[M]=!0,e}function i(e){var t=D.createElement("fieldset");try{return!!e(t)}catch(o){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function t(e,t){for(var o=e.split("|"),n=o.length;n--;)k.attrHandle[o[n]]=t}function u(e,t){var o=t&&e,n=o&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(n)return n;if(o)for(;o=o.nextSibling;)if(o===t)return-1;return e?1:-1}function n(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function r(o){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===o}}function s(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&Re(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function l(s){return a(function(r){return r=+r,a(function(e,t){for(var o,n=s([],e.length,r),i=n.length;i--;)e[o=n[i]]&&(e[o]=!(t[o]=e[o]))})})}function p(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function c(){}function m(e){for(var t=0,o=e.length,n="";t+~]|"+ne+")"+ne+"*"),de=new RegExp(ne+"|>"),fe=new RegExp(se),he=new RegExp("^"+ie+"$"),pe={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+re),PSEUDO:new RegExp("^"+se),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+oe+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},me=/HTML$/i,be=/^(?:input|select|textarea|button)$/i,ye=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,we=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ge=/[+~]/,xe=new RegExp("\\\\[\\da-fA-F]{1,6}"+ne+"?|\\\\([^\\r\\n\\f])","g"),_e=function(e,t){var o="0x"+e.slice(1)-65536;return t||(o<0?String.fromCharCode(o+65536):String.fromCharCode(o>>10|55296,1023&o|56320))},ke=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Se=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Ae=function(){N()},Re=d(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{Z.apply(K=ee.call(H.childNodes),H.childNodes),K[H.childNodes.length].nodeType}catch(Ce){Z={apply:K.length?function(e,t){J.apply(e,ee.call(t))}:function(e,t){for(var o=e.length,n=0;e[o++]=t[n++];);e.length=o-1}}}for(y in _=g.support={},A=g.isXML=function(e){var t=e.namespaceURI,o=(e.ownerDocument||e).documentElement;return!me.test(t||o&&o.nodeName||"HTML")},N=g.setDocument=function(e){var t,o,n=e?e.ownerDocument||e:H;return n!=D&&9===n.nodeType&&n.documentElement&&(F=(D=n).documentElement,L=!A(D),H!=D&&(o=D.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",Ae,!1):o.attachEvent&&o.attachEvent("onunload",Ae)),_.scope=i(function(e){return F.appendChild(e).appendChild(D.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),_.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),_.getElementsByTagName=i(function(e){return e.appendChild(D.createComment("")),!e.getElementsByTagName("*").length}),_.getElementsByClassName=ve.test(D.getElementsByClassName),_.getById=i(function(e){return F.appendChild(e).id=M,!D.getElementsByName||!D.getElementsByName(M).length}),_.getById?(k.filter.ID=function(e){var t=e.replace(xe,_e);return function(e){return e.getAttribute("id")===t}},k.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&L){var o=t.getElementById(e);return o?[o]:[]}}):(k.filter.ID=function(e){var o=e.replace(xe,_e);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===o}},k.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&L){var o,n,i,r=t.getElementById(e);if(r){if((o=r.getAttributeNode("id"))&&o.value===e)return[r];for(i=t.getElementsByName(e),n=0;r=i[n++];)if((o=r.getAttributeNode("id"))&&o.value===e)return[r]}return[]}}),k.find.TAG=_.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):_.qsa?t.querySelectorAll(e):void 0}:function(e,t){var o,n=[],i=0,r=t.getElementsByTagName(e);if("*"!==e)return r;for(;o=r[i++];)1===o.nodeType&&n.push(o);return n},k.find.CLASS=_.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&L)return t.getElementsByClassName(e)},Y=[],O=[],(_.qsa=ve.test(D.querySelectorAll))&&(i(function(e){var t;F.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&O.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||O.push("\\["+ne+"*(?:value|"+oe+")"),e.querySelectorAll("[id~="+M+"-]").length||O.push("~="),(t=D.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||O.push("\\["+ne+"*name"+ne+"*="+ne+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||O.push(":checked"),e.querySelectorAll("a#"+M+"+*").length||O.push(".#.+[+~]"),e.querySelectorAll("\\\f"),O.push("[\\r\\n\\f]")}),i(function(e){e.innerHTML="";var t=D.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&O.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&O.push(":enabled",":disabled"),F.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&O.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),O.push(",.*:")})),(_.matchesSelector=ve.test(U=F.matches||F.webkitMatchesSelector||F.mozMatchesSelector||F.oMatchesSelector||F.msMatchesSelector))&&i(function(e){_.disconnectedMatch=U.call(e,"*"),U.call(e,"[s!='']:x"),Y.push("!=",se)}),O=O.length&&new RegExp(O.join("|")),Y=Y.length&&new RegExp(Y.join("|")),t=ve.test(F.compareDocumentPosition),j=t||ve.test(F.contains)?function(e,t){var o=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(o.contains?o.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},X=t?function(e,t){if(e===t)return I=!0,0;var o=!e.compareDocumentPosition-!t.compareDocumentPosition;return o||(1&(o=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!_.sortDetached&&t.compareDocumentPosition(e)===o?e==D||e.ownerDocument==H&&j(H,e)?-1:t==D||t.ownerDocument==H&&j(H,t)?1:E?te(E,e)-te(E,t):0:4&o?-1:1)}:function(e,t){if(e===t)return I=!0,0;var o,n=0,i=e.parentNode,r=t.parentNode,s=[e],l=[t];if(!i||!r)return e==D?-1:t==D?1:i?-1:r?1:E?te(E,e)-te(E,t):0;if(i===r)return u(e,t);for(o=e;o=o.parentNode;)s.unshift(o);for(o=t;o=o.parentNode;)l.unshift(o);for(;s[n]===l[n];)n++;return n?u(s[n],l[n]):s[n]==H?-1:l[n]==H?1:0}),D},g.matches=function(e,t){return g(e,null,null,t)},g.matchesSelector=function(e,t){if(N(e),_.matchesSelector&&L&&!W[t+" "]&&(!Y||!Y.test(t))&&(!O||!O.test(t)))try{var o=U.call(e,t);if(o||_.disconnectedMatch||e.document&&11!==e.document.nodeType)return o}catch(Ce){W(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xe,_e),e[3]=(e[3]||e[4]||e[5]||"").replace(xe,_e),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||g.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&g.error(e[0]),e},PSEUDO:function(e){var t,o=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":o&&fe.test(o)&&(t=R(o,!0))&&(t=o.indexOf(")",o.length-t)-o.length)&&(e[0]=e[0].slice(0,t),e[2]=o.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(xe,_e).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=P[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&P(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(o,n,i){return function(e){var t=g.attr(e,o);return null==t?"!="===n:!n||(t+="","="===n?t===i:"!="===n?t!==i:"^="===n?i&&0===t.indexOf(i):"*="===n?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;Se.filter=function(e,t,o){var n=t[0];return o&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?Se.find.matchesSelector(n,e)?[n]:[]:Se.find.matches(e,Se.grep(t,function(e){return 1===e.nodeType}))},Se.fn.extend({find:function(e){var t,o,n=this.length,i=this;if("string"!=typeof e)return this.pushStack(Se(e).filter(function(){for(t=0;t)[^>]*|#([\w-]+))$/;(Se.fn.init=function(e,t,o){var n,i;if(!e)return this;if(o=o||Ee,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):we(e)?o.ready!==undefined?o.ready(e):e(Se):Se.makeArray(e,this);if(!(n="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:Ie.exec(e))||!n[1]&&t)return!t||t.jquery?(t||o).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof Se?t[0]:t,Se.merge(this,Se.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:xe,!0)),qe.test(n[1])&&Se.isPlainObject(t))for(n in t)we(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return(i=xe.getElementById(n[2]))&&(this[0]=i,this.length=1),this}).prototype=Se.fn,Ee=Se(xe);var Ne=/^(?:parents|prev(?:Until|All))/,De={children:!0,contents:!0,next:!0,prev:!0};Se.fn.extend({has:function(e){var t=Se(e,this),o=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,nt=/^$|^module$|\/(?:java|ecma)script/i;Ze=xe.createDocumentFragment().appendChild(xe.createElement("div")),(et=xe.createElement("input")).setAttribute("type","radio"),et.setAttribute("checked","checked"),et.setAttribute("name","t"),Ze.appendChild(et),ve.checkClone=Ze.cloneNode(!0).cloneNode(!0).lastChild.checked,Ze.innerHTML="",ve.noCloneChecked=!!Ze.cloneNode(!0).lastChild.defaultValue,Ze.innerHTML="",ve.option=!!Ze.lastChild;var it={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};it.tbody=it.tfoot=it.colgroup=it.caption=it.thead,it.th=it.td,ve.option||(it.optgroup=it.option=[1,""]);var rt=/<|&#?\w+;/,st=/^key/,lt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,at=/^([^.]*)(?:\.(.+)|)/;Se.event={global:{},add:function(t,e,o,n,i){var r,s,l,a,u,c,d,f,h,p,m,b=He.get(t);if(Me(t))for(o.handler&&(o=(r=o).handler,i=r.selector),i&&Se.find.matchesSelector(Xe,i),o.guid||(o.guid=Se.guid++),(a=b.events)||(a=b.events=Object.create(null)),(s=b.handle)||(s=b.handle=function(e){return void 0!==Se&&Se.event.triggered!==e.type?Se.event.dispatch.apply(t,arguments):undefined}),u=(e=(e||"").match(Fe)||[""]).length;u--;)h=m=(l=at.exec(e[u])||[])[1],p=(l[2]||"").split(".").sort(),h&&(d=Se.event.special[h]||{},h=(i?d.delegateType:d.bindType)||h,d=Se.event.special[h]||{},c=Se.extend({type:h,origType:m,data:n,handler:o,guid:o.guid,selector:i,needsContext:i&&Se.expr.match.needsContext.test(i),namespace:p.join(".")},r),(f=a[h])||((f=a[h]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,n,p,s)||t.addEventListener&&t.addEventListener(h,s)),d.add&&(d.add.call(t,c),c.handler.guid||(c.handler.guid=o.guid)),i?f.splice(f.delegateCount++,0,c):f.push(c),Se.event.global[h]=!0)},remove:function(e,t,o,n,i){var r,s,l,a,u,c,d,f,h,p,m,b=He.hasData(e)&&He.get(e);if(b&&(a=b.events)){for(u=(t=(t||"").match(Fe)||[""]).length;u--;)if(h=m=(l=at.exec(t[u])||[])[1],p=(l[2]||"").split(".").sort(),h){for(d=Se.event.special[h]||{},f=a[h=(n?d.delegateType:d.bindType)||h]||[],l=l[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=r=f.length;r--;)c=f[r],!i&&m!==c.origType||o&&o.guid!==c.guid||l&&!l.test(c.namespace)||n&&n!==c.selector&&("**"!==n||!c.selector)||(f.splice(r,1),c.selector&&f.delegateCount--,d.remove&&d.remove.call(e,c));s&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,p,b.handle)||Se.removeEvent(e,h,b.handle),delete a[h])}else for(h in a)Se.event.remove(e,h+t[u],o,n,!0);Se.isEmptyObject(a)&&He.remove(e,"handle events")}},dispatch:function(e){var t,o,n,i,r,s,l=new Array(arguments.length),a=Se.event.fix(e),u=(He.get(this,"events")||Object.create(null))[a.type]||[],c=Se.event.special[a.type]||{};for(l[0]=a,t=1;t\s*$/g;Se.extend({htmlPrefilter:function(e){return e},clone:function(e,t,o){var n,i,r,s,l=e.cloneNode(!0),a=Qe(e);if(!(ve.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Se.isXMLDoc(e)))for(s=g(l),n=0,i=(r=g(e)).length;n").attr(o.scriptAttrs||{}).prop({charset:o.scriptCharset,src:o.url}).on("load error",i=function(e){n.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),xe.head.appendChild(n[0])},abort:function(){i&&i()}}});var oo,no=[],io=/(=)\?(?=&|$)|\?\?/;Se.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=no.pop()||Se.expando+"_"+Yt.guid++;return this[e]=!0,e}}),Se.ajaxPrefilter("json jsonp",function(e,t,o){var n,i,r,s=!1!==e.jsonp&&(io.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&io.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return n=e.jsonpCallback=we(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(io,"$1"+n):!1!==e.jsonp&&(e.url+=(Ut.test(e.url)?"&":"?")+e.jsonp+"="+n),e.converters["script json"]=function(){return r||Se.error(n+" was not called"),r[0]},e.dataTypes[0]="json",i=S[n],S[n]=function(){r=arguments},o.always(function(){i===undefined?Se(S).removeProp(n):S[n]=i,e[n]&&(e.jsonpCallback=t.jsonpCallback,no.push(n)),r&&we(i)&&i(r[0]),r=i=undefined}),"script"}),ve.createHTMLDocument=((oo=xe.implementation.createHTMLDocument("").body).innerHTML="
",2===oo.childNodes.length),Se.parseHTML=function(e,t,o){return"string"!=typeof e?[]:("boolean"==typeof t&&(o=t,t=!1),t||(ve.createHTMLDocument?((n=(t=xe.implementation.createHTMLDocument("")).createElement("base")).href=xe.location.href,t.head.appendChild(n)):t=xe),r=!o&&[],(i=qe.exec(e))?[t.createElement(i[1])]:(i=_([e],t,r),r&&r.length&&Se(r).remove(),Se.merge([],i.childNodes)));var n,i,r},Se.fn.load=function(e,t,o){var n,i,r,s=this,l=e.indexOf(" ");return-1").append(Se.parseHTML(e)).find(n):e)}).always(o&&function(e,t){s.each(function(){o.apply(this,r||[e.responseText,t,e])})}),this},Se.expr.pseudos.animated=function(t){return Se.grep(Se.timers,function(e){return t===e.elem}).length},Se.offset={setOffset:function(e,t,o){var n,i,r,s,l,a,u=Se.css(e,"position"),c=Se(e),d={};"static"===u&&(e.style.position="relative"),l=c.offset(),r=Se.css(e,"top"),a=Se.css(e,"left"),("absolute"===u||"fixed"===u)&&-1<(r+a).indexOf("auto")?(s=(n=c.position()).top,i=n.left):(s=parseFloat(r)||0,i=parseFloat(a)||0),we(t)&&(t=t.call(e,o,Se.extend({},l))),null!=t.top&&(d.top=t.top-l.top+s),null!=t.left&&(d.left=t.left-l.left+i),"using"in t?t.using.call(e,d):("number"==typeof d.top&&(d.top+="px"),"number"==typeof d.left&&(d.left+="px"),c.css(d))}},Se.fn.extend({offset:function(t){if(arguments.length)return t===undefined?this:this.each(function(e){Se.offset.setOffset(this,t,e)});var e,o,n=this[0];return n?n.getClientRects().length?(e=n.getBoundingClientRect(),o=n.ownerDocument.defaultView,{top:e.top+o.pageYOffset,left:e.left+o.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,o,n=this[0],i={top:0,left:0};if("fixed"===Se.css(n,"position"))t=n.getBoundingClientRect();else{for(t=this.offset(),o=n.ownerDocument,e=n.offsetParent||o.documentElement;e&&(e===o.body||e===o.documentElement)&&"static"===Se.css(e,"position");)e=e.parentNode;e&&e!==n&&1===e.nodeType&&((i=Se(e).offset()).top+=Se.css(e,"borderTopWidth",!0),i.left+=Se.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-Se.css(n,"marginTop",!0),left:t.left-i.left-Se.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===Se.css(e,"position");)e=e.offsetParent;return e||Xe})}}),Se.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var r="pageYOffset"===i;Se.fn[t]=function(e){return Ye(this,function(e,t,o){var n;if(ge(e)?n=e:9===e.nodeType&&(n=e.defaultView),o===undefined)return n?n[i]:e[t];n?n.scrollTo(r?n.pageXOffset:o,r?o:n.pageYOffset):e[t]=o},t,e,arguments.length)}}),Se.each(["top","left"],function(e,o){Se.cssHooks[o]=U(ve.pixelPosition,function(e,t){if(t)return t=Y(e,o),ft.test(t)?Se(e).position()[o]+"px":t})}),Se.each({Height:"height",Width:"width"},function(s,l){Se.each({padding:"inner"+s,content:l,"":"outer"+s},function(n,r){Se.fn[r]=function(e,t){var o=arguments.length&&(n||"boolean"!=typeof e),i=n||(!0===e||!0===t?"margin":"border");return Ye(this,function(e,t,o){var n;return ge(e)?0===r.indexOf("outer")?e["inner"+s]:e.document.documentElement["client"+s]:9===e.nodeType?(n=e.documentElement,Math.max(e.body["scroll"+s],n["scroll"+s],e.body["offset"+s],n["offset"+s],n["client"+s])):o===undefined?Se.css(e,t,i):Se.style(e,t,o,i)},l,o?e:undefined,o)}})}),Se.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){Se.fn[t]=function(e){return this.on(t,e)}}),Se.fn.extend({bind:function(e,t,o){return this.on(e,null,t,o)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,o,n){return this.on(t,e,o,n)},undelegate:function(e,t,o){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",o)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),Se.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,o){Se.fn[o]=function(e,t){return 0'),l='';r===a||i===a||u.isCrossDomain(t)||(l+=''),n&&s.attr("target",n),s.hide().append(l).appendTo("body"),s.submit()},formElements:function(e,t){return e.is("form")?c(e[0].elements).filter(t):e.find(t)},disableFormElements:function(e){u.formElements(e,u.disableSelector).each(function(){u.disableFormElement(c(this))})},disableFormElement:function(e){var t,o;t=e.is("button")?"html":"val",(o=e.data("disable-with"))!==a&&(e.data("ujs:enable-with",e[t]()),e[t](o)),e.prop("disabled",!0),e.data("ujs:disabled",!0)},enableFormElements:function(e){u.formElements(e,u.enableSelector).each(function(){u.enableFormElement(c(this))})},enableFormElement:function(e){var t=e.is("button")?"html":"val";e.data("ujs:enable-with")!==a&&(e[t](e.data("ujs:enable-with")),e.removeData("ujs:enable-with")),e.prop("disabled",!1),e.removeData("ujs:disabled")},allowAction:function(e){var t,o=e.data("confirm"),n=!1;if(!o)return!0;if(u.fire(e,"confirm")){try{n=u.confirm(o)}catch(i){(console.error||console.log).call(console,i.stack||i)}t=u.fire(e,"confirm:complete",[n])}return n&&t},blankInputs:function(e,t,o){var n,i,r,s=c(),l=t||"input,textarea",a=e.find(l),u={};return a.each(function(){(n=c(this)).is("input[type=radio]")?(r=n.attr("name"),u[r]||(0===e.find('input[type=radio]:checked[name="'+r+'"]').length&&(i=e.find('input[type=radio][name="'+r+'"]'),s=s.add(i)),u[r]=r)):(n.is("input[type=checkbox],input[type=radio]")?n.is(":checked"):!!n.val())===o&&(s=s.add(n))}),!!s.length&&s},nonBlankInputs:function(e,t){return u.blankInputs(e,t,!0)},stopEverything:function(e){return c(e.target).trigger("ujs:everythingStopped"),e.stopImmediatePropagation(),!1},disableElement:function(e){var t=e.data("disable-with");t!==a&&(e.data("ujs:enable-with",e.html()),e.html(t)),e.bind("click.railsDisable",function(e){return u.stopEverything(e)}),e.data("ujs:disabled",!0)},enableElement:function(e){e.data("ujs:enable-with")!==a&&(e.html(e.data("ujs:enable-with")),e.removeData("ujs:enable-with")),e.unbind("click.railsDisable"),e.removeData("ujs:disabled")}},u.fire(e,"rails:attachBindings")&&(c.ajaxPrefilter(function(e,t,o){e.crossDomain||u.CSRFProtection(o)}),c(window).on("pageshow.rails",function(){c(c.rails.enableSelector).each(function(){var e=c(this);e.data("ujs:disabled")&&c.rails.enableFormElement(e)}),c(c.rails.linkDisableSelector).each(function(){var e=c(this);e.data("ujs:disabled")&&c.rails.enableElement(e)})}),e.on("ajax:complete",u.linkDisableSelector,function(){u.enableElement(c(this))}),e.on("ajax:complete",u.buttonDisableSelector,function(){u.enableFormElement(c(this))}),e.on("click.rails",u.linkClickSelector,function(e){var t=c(this),o=t.data("method"),n=t.data("params"),i=e.metaKey||e.ctrlKey;if(!u.allowAction(t))return u.stopEverything(e);if(!i&&t.is(u.linkDisableSelector)&&u.disableElement(t),u.isRemote(t)){if(i&&(!o||"GET"===o)&&!n)return!0;var r=u.handleRemote(t);return!1===r?u.enableElement(t):r.fail(function(){u.enableElement(t)}),!1}return o?(u.handleMethod(t),!1):void 0}),e.on("click.rails",u.buttonClickSelector,function(e){var t=c(this);if(!u.allowAction(t)||!u.isRemote(t))return u.stopEverything(e);t.is(u.buttonDisableSelector)&&u.disableFormElement(t);var o=u.handleRemote(t);return!1===o?u.enableFormElement(t):o.fail(function(){u.enableFormElement(t)}),!1}),e.on("change.rails",u.inputChangeSelector,function(e){var t=c(this);return u.allowAction(t)&&u.isRemote(t)?(u.handleRemote(t),!1):u.stopEverything(e)}),e.on("submit.rails",u.formSubmitSelector,function(e){var t,o,n=c(this),i=u.isRemote(n);if(!u.allowAction(n))return u.stopEverything(e);if(n.attr("novalidate")===a)if(n.data("ujs:formnovalidate-button")===a){if((t=u.blankInputs(n,u.requiredInputSelector,!1))&&u.fire(n,"ajax:aborted:required",[t]))return u.stopEverything(e)}else n.data("ujs:formnovalidate-button",a);if(i){if(o=u.nonBlankInputs(n,u.fileInputSelector)){setTimeout(function(){u.disableFormElements(n)},13);var r=u.fire(n,"ajax:aborted:file",[o]);return r||setTimeout(function(){ u.enableFormElements(n)},13),r}return u.handleRemote(n),!1}setTimeout(function(){u.disableFormElements(n)},13)}),e.on("click.rails",u.formInputClickSelector,function(e){var t=c(this);if(!u.allowAction(t))return u.stopEverything(e);var o=t.attr("name"),n=o?{name:o,value:t.val()}:null,i=t.closest("form");0===i.length&&(i=c("#"+t.attr("form"))),i.data("ujs:submit-button",n),i.data("ujs:formnovalidate-button",t.attr("formnovalidate")),i.data("ujs:submit-button-formaction",t.attr("formaction")),i.data("ujs:submit-button-formmethod",t.attr("formmethod"))}),e.on("ajax:send.rails",u.formSubmitSelector,function(e){this===e.target&&u.disableFormElements(c(this))}),e.on("ajax:complete.rails",u.formSubmitSelector,function(e){this===e.target&&u.enableFormElements(c(this))}),c(function(){u.refreshCSRFTokens()}))}(jQuery),function(){var t,o;t=window.jQuery||("function"==typeof require?require("jquery"):void 0),o=t(document),t.turbo={version:"2.1.0",isReady:!1,use:function(e,t){return o.off(".turbo").on(e+".turbo",this.onLoad).on(t+".turbo",this.onFetch)},addCallback:function(e){return t.turbo.isReady&&e(t),o.on("turbo:ready",function(){return e(t)})},onLoad:function(){return t.turbo.isReady=!0,o.trigger("turbo:ready")},onFetch:function(){return t.turbo.isReady=!1},register:function(){return t(this.onLoad),t.fn.ready=this.addCallback}},t.turbo.register(),t.turbo.use("page:load","page:fetch")}.call(this),function(){var i,e,n,l,o,t,r,s,a,u,c,d,f,h,p,m,b,y,v,w,g,x,_,k,S,A,R,C,T,q,E,I,N,D,F,L,O,Y,U,j,M,H,B,$,P,V,z,W,X,Q,K,G,J,Z,ee,te=[].indexOf||function(e){for(var t=0,o=this.length;t/gi,""),e},Q=function(){var e,t;if((e=(t=document.querySelectorAll("input[autofocus], textarea[autofocus]"))[t.length-1])&&document.activeElement!==e)return e.focus()},H=function(e){if((e=new n(e)).absolute!==M)return window.history.pushState({turbolinks:!0,url:e.absolute},"",e.absolute)},B=function(){var e,t;if(e=ee.getResponseHeader("X-XHR-Redirected-To"))return t=(e=new n(e)).hasNoHash()?document.location.hash:"",window.history.replaceState(window.history.state,"",e.href+t)},b=function(){var e;if(null!=(e=ee.getResponseHeader("Location"))&&new n(e).crossOrigin())return e},V=function(){return M=document.location.href},P=function(){return window.history.replaceState({turbolinks:!0,url:document.location.href},"",document.location.href)},$=function(){return y=window.history.state},I=function(){var e;if(navigator.userAgent.match(/Firefox/)&&!(e=new n).hasNoHash())return window.history.replaceState(y,"",e.withoutHash()),document.location.hash=e.hash},U=function(e){return window.scrollTo(e.positionX,e.positionY)},X=function(){return document.location.hash?document.location.href=document.location.href:window.scrollTo(0,0)},h=function(e){var t,o,n;if(null==e||"object"!=typeof e)return e;for(o in t=new e.constructor,e)n=e[o],t[o]=h(n);return t},L=function(e){var t,o;return o=(null!=(t=document.cookie.match(new RegExp(e+"=(\\w+)")))?t[1].toUpperCase():void 0)||"",document.cookie=e+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/",o},J=function(e,t){var o;return"undefined"!=typeof Prototype&&Event.fire(document,e,t,!0),o=document.createEvent("Events"),t&&(o.data=t),o.initEvent(e,!0,!0),document.dispatchEvent(o)},D=function(e){return!J(l.BEFORE_CHANGE,{url:e})},O=function(){var e,t,o,n,i;if(i=function(){var e;return null!=(e=ee.getResponseHeader("Content-Type"))&&e.match(/^(?:text\/html|application\/xhtml\+xml|application\/xml)(?:;|$)/)},o=function(e){var t,o,n,i,r;for(r=[],t=0,o=(i=e.querySelector("head").childNodes).length;tt.length&&(e=(i=[t,e])[0],t=i[1]),r=[],o=0,n=e.length;o(t=this.value)&&t<=100){if(this.value=e,this._updateStyle(),100===this.value)return this._stopTrickle();if(0=n.clientWidth&&o>=n.clientHeight}),d=0a[e]&&!n.escapeWithReference&&(o=G(c[t],a[e]-("right"===e?c.width:c.height))),ae({},t,o)}};return u.forEach(function(e){var t=-1===["left","top"].indexOf(e)?"secondary":"primary";c=ue({},c,d[t](e))}),e.offsets.popper=c,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,n=t.reference,i=e.placement.split("-")[0],r=J,s=-1!==["top","bottom"].indexOf(i),l=s?"right":"bottom",a=s?"left":"top",u=s?"width":"height";return o[l]r(n[l])&&(e.offsets.popper[a]=r(n[l])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var o;if(!V(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if("string"==typeof n){if(!(n=e.instance.popper.querySelector(n)))return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],r=e.offsets,s=r.popper,l=r.reference,a=-1!==["left","right"].indexOf(i),u=a?"height":"width",c=a?"Top":"Left",d=c.toLowerCase(),f=a?"left":"top",h=a?"bottom":"right",p=I(n)[u];l[h]-ps[h]&&(e.offsets.popper[d]+=l[d]+p-s[h]),e.offsets.popper=k(e.offsets.popper);var m=l[d]+l[u]/2-p/2,b=g(e.instance.popper),y=parseFloat(b["margin"+c],10),v=parseFloat(b["border"+c+"Width"],10),w=m-e.offsets.popper[d]-y-v;return w=ee(G(s[u]-p,w),0),e.arrowElement=n,e.offsets.arrow=(ae(o={},d,Z(w)),ae(o,f,""),o),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(m,b){if(t(m.instance.modifiers,"inner"))return m;if(m.flipped&&m.placement===m.originalPlacement)return m;var y=h(m.instance.popper,m.instance.reference,b.padding,b.boundariesElement,m.positionFixed),v=m.placement.split("-")[0],w=N(v),g=m.placement.split("-")[1]||"",x=[];switch(b.behavior){case he.FLIP:x=[v,w];break;case he.CLOCKWISE:x=W(v);break;case he.COUNTERCLOCKWISE:x=W(v,!0);break;default:x=b.behavior}return x.forEach(function(e,t){if(v!==e||x.length===t+1)return m;v=m.placement.split("-")[0],w=N(v);var o=m.offsets.popper,n=m.offsets.reference,i=J,r="left"===v&&i(o.right)>i(n.left)||"right"===v&&i(o.left)i(n.top)||"bottom"===v&&i(o.top)i(y.right),a=i(o.top)i(y.bottom),c="left"===v&&s||"right"===v&&l||"top"===v&&a||"bottom"===v&&u,d=-1!==["top","bottom"].indexOf(v),f=!!b.flipVariations&&(d&&"start"===g&&s||d&&"end"===g&&l||!d&&"start"===g&&a||!d&&"end"===g&&u),h=!!b.flipVariationsByContent&&(d&&"start"===g&&l||d&&"end"===g&&s||!d&&"start"===g&&u||!d&&"end"===g&&a),p=f||h;(r||c||p)&&(m.flipped=!0,(r||c)&&(v=x[t+1]),p&&(g=z(g)),m.placement=v+(g?"-"+g:""),m.offsets.popper=ue({},m.offsets.popper,D(m.instance.popper,m.offsets.reference,m.placement)),m=L(m.instance.modifiers,m,"flip"))}),m},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split("-")[0], n=e.offsets,i=n.popper,r=n.reference,s=-1!==["left","right"].indexOf(o),l=-1===["top","left"].indexOf(o);return i[s?"left":"top"]=r[o]-(l?i[s?"width":"height"]:0),e.placement=N(t),e.offsets.popper=k(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!V(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,o=F(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottomo.right||t.top>o.bottom||t.right=r)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};Y.jQueryDetection(),a();var p="alert",m="4.5.3",b="bs.alert",y="."+b,v=".data-api",w=L["default"].fn[p],g='[data-dismiss="alert"]',x="close"+y,_="closed"+y,k="click"+y+v,S="alert",A="fade",R="show",C=function(){function n(e){this._element=e}var e=n.prototype;return e.close=function o(e){var t=this._element;e&&(t=this._getRootElement(e)),this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},e.dispose=function t(){L["default"].removeData(this._element,b),this._element=null},e._getRootElement=function i(e){var t=Y.getSelectorFromElement(e),o=!1;return t&&(o=document.querySelector(t)),o||(o=L["default"](e).closest("."+S)[0]),o},e._triggerCloseEvent=function r(e){var t=L["default"].Event(x);return L["default"](e).trigger(t),t},e._removeElement=function s(t){var o=this;if(L["default"](t).removeClass(R),L["default"](t).hasClass(A)){var e=Y.getTransitionDurationFromElement(t);L["default"](t).one(Y.TRANSITION_END,function(e){return o._destroyElement(t,e)}).emulateTransitionEnd(e)}else this._destroyElement(t)},e._destroyElement=function l(e){L["default"](e).detach().trigger(_).remove()},n._jQueryInterface=function a(o){return this.each(function(){var e=L["default"](this),t=e.data(b);t||(t=new n(this),e.data(b,t)),"close"===o&&t[o](this)})},n._handleDismiss=function u(t){return function(e){e&&e.preventDefault(),t.close(this)}},N(n,null,[{key:"VERSION",get:function c(){return m}}]),n}();L["default"](document).on(k,g,C._handleDismiss(new C)),L["default"].fn[p]=C._jQueryInterface,L["default"].fn[p].Constructor=C,L["default"].fn[p].noConflict=function(){return L["default"].fn[p]=w,C._jQueryInterface};var T="button",q="4.5.3",E="bs.button",I="."+E,U=".data-api",j=L["default"].fn[T],M="active",H="btn",B="focus",$='[data-toggle^="button"]',P='[data-toggle="buttons"]',V='[data-toggle="button"]',z='[data-toggle="buttons"] .btn',W='input:not([type="hidden"])',X=".active",Q=".btn",K="click"+I+U,G="focus"+I+U+" blur"+I+U,J="load"+I+U,Z=function(){function i(e){this._element=e,this.shouldAvoidTriggerChange=!1}var e=i.prototype;return e.toggle=function r(){var e=!0,t=!0,o=L["default"](this._element).closest(P)[0];if(o){var n=this._element.querySelector(W);if(n){if("radio"===n.type)if(n.checked&&this._element.classList.contains(M))e=!1;else{var i=o.querySelector(X);i&&L["default"](i).removeClass(M)}e&&("checkbox"!==n.type&&"radio"!==n.type||(n.checked=!this._element.classList.contains(M)),this.shouldAvoidTriggerChange||L["default"](n).trigger("change")),n.focus(),t=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(t&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(M)),e&&L["default"](this._element).toggleClass(M))},e.dispose=function t(){L["default"].removeData(this._element,E),this._element=null},i._jQueryInterface=function s(o,n){return this.each(function(){var e=L["default"](this),t=e.data(E);t||(t=new i(this),e.data(E,t)),t.shouldAvoidTriggerChange=n,"toggle"===o&&t[o]()})},N(i,null,[{key:"VERSION",get:function o(){return q}}]),i}();L["default"](document).on(K,$,function(e){var t=e.target,o=t;if(L["default"](t).hasClass(H)||(t=L["default"](t).closest(Q)[0]),!t||t.hasAttribute("disabled")||t.classList.contains("disabled"))e.preventDefault();else{var n=t.querySelector(W);if(n&&(n.hasAttribute("disabled")||n.classList.contains("disabled")))return void e.preventDefault();"INPUT"!==o.tagName&&"LABEL"===t.tagName||Z._jQueryInterface.call(L["default"](t),"toggle","INPUT"===o.tagName)}}).on(G,$,function(e){var t=L["default"](e.target).closest(Q)[0];L["default"](t).toggleClass(B,/^focus(in)?$/.test(e.type))}),L["default"](window).on(J,function(){for(var e=[].slice.call(document.querySelectorAll(z)),t=0,o=e.length;tthis._items.length-1||e<0))if(this._isSliding)L["default"](this._element).one(ye,function(){return t.to(e)});else{if(o===e)return this.pause(),void this.cycle();var n=odocument.documentElement.clientHeight;o||(this._element.style.overflowY="hidden"),this._element.classList.add(Io);var n=Y.getTransitionDurationFromElement(this._dialog);L["default"](this._element).off(Y.TRANSITION_END),L["default"](this._element).one(Y.TRANSITION_END,function(){e._element.classList.remove(Io),o||L["default"](e._element).one(Y.TRANSITION_END,function(){e._element.style.overflowY=""}).emulateTransitionEnd(e._element,n)}).emulateTransitionEnd(n),this._element.focus()}else this.hide()},e._showElement=function u(e){var t=this,o=L["default"](this._element).hasClass(qo),n=this._dialog?this._dialog.querySelector(Do):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),L["default"](this._dialog).hasClass(Ao)&&n?n.scrollTop=0:this._element.scrollTop=0,o&&Y.reflow(this._element),L["default"](this._element).addClass(Eo),this._config.focus&&this._enforceFocus();var i=L["default"].Event(yo,{relatedTarget:e}),r=function r(){t._config.focus&&t._element.focus(),t._isTransitioning=!1,L["default"](t._element).trigger(i)};if(o){var s=Y.getTransitionDurationFromElement(this._dialog);L["default"](this._dialog).one(Y.TRANSITION_END,r).emulateTransitionEnd(s)}else r()},e._enforceFocus=function c(){var t=this;L["default"](document).off(vo).on(vo,function(e){document!==e.target&&t._element!==e.target&&0===L["default"](t._element).has(e.target).length&&t._element.focus()})},e._setEscapeEvent=function d(){var t=this;this._isShown?L["default"](this._element).on(xo,function(e){t._config.keyboard&&e.which===uo?(e.preventDefault(),t.hide()):t._config.keyboard||e.which!==uo||t._triggerBackdropTransition()}):this._isShown||L["default"](this._element).off(xo)},e._setResizeEvent=function f(){var t=this;this._isShown?L["default"](window).on(wo,function(e){return t.handleUpdate(e)}):L["default"](window).off(wo)},e._hideModal=function h(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop(function(){L["default"](document.body).removeClass(To),e._resetAdjustments(),e._resetScrollbar(),L["default"](e._element).trigger(mo)})},e._removeBackdrop=function p(){this._backdrop&&(L["default"](this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function m(e){var t=this,o=L["default"](this._element).hasClass(qo)?qo:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=Co,o&&this._backdrop.classList.add(o),L["default"](this._backdrop).appendTo(document.body),L["default"](this._element).on(go,function(e){t._ignoreBackdropClick?t._ignoreBackdropClick=!1:e.target===e.currentTarget&&t._triggerBackdropTransition()}),o&&Y.reflow(this._backdrop),L["default"](this._backdrop).addClass(Eo),!e)return;if(!o)return void e();var n=Y.getTransitionDurationFromElement(this._backdrop);L["default"](this._backdrop).one(Y.TRANSITION_END,e).emulateTransitionEnd(n)}else if(!this._isShown&&this._backdrop){L["default"](this._backdrop).removeClass(Eo);var i=function i(){t._removeBackdrop(),e&&e()};if(L["default"](this._element).hasClass(qo)){var r=Y.getTransitionDurationFromElement(this._backdrop);L["default"](this._backdrop).one(Y.TRANSITION_END,i).emulateTransitionEnd(r)}else i()}else e&&e()},e._adjustDialog=function b(){var e=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&e&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!e&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function y(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function v(){var e=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(e.left+e.right)
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:Mo,popperConfig:null},en="show",tn="out",on={HIDE:"hide"+zo,HIDDEN:"hidden"+zo,SHOW:"show"+zo,SHOWN:"shown"+zo,INSERTED:"inserted"+zo,CLICK:"click"+zo,FOCUSIN:"focusin"+zo,FOCUSOUT:"focusout"+zo,MOUSEENTER:"mouseenter"+zo,MOUSELEAVE:"mouseleave"+zo},nn="fade",rn="show",sn=".tooltip-inner",ln=".arrow",an="hover",un="focus",cn="click",dn="manual",fn=function(){function i(e,t){if("undefined"==typeof O["default"])throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=e,this.config=this._getConfig(t),this.tip=null,this._setListeners()}var e=i.prototype;return e.enable=function t(){this._isEnabled=!0},e.disable=function o(){this._isEnabled=!1},e.toggleEnabled=function n(){this._isEnabled=!this._isEnabled},e.toggle=function r(e){if(this._isEnabled)if(e){var t=this.constructor.DATA_KEY,o=L["default"](e.currentTarget).data(t);o||(o=new this.constructor(e.currentTarget,this._getDelegateConfig()),L["default"](e.currentTarget).data(t,o)),o._activeTrigger.click=!o._activeTrigger.click,o._isWithActiveTrigger()?o._enter(null,o):o._leave(null,o)}else{if(L["default"](this.getTipElement()).hasClass(rn))return void this._leave(null,this);this._enter(null,this)}},e.dispose=function s(){clearTimeout(this._timeout),L["default"].removeData(this.element,this.constructor.DATA_KEY),L["default"](this.element).off(this.constructor.EVENT_KEY),L["default"](this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&L["default"](this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},e.show=function d(){var t=this;if("none"===L["default"](this.element).css("display"))throw new Error("Please use show on visible elements");var e=L["default"].Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){L["default"](this.element).trigger(e);var o=Y.findShadowRoot(this.element),n=L["default"].contains(null!==o?o:this.element.ownerDocument.documentElement,this.element);if(e.isDefaultPrevented()||!n)return;var i=this.getTipElement(),r=Y.getUID(this.constructor.NAME);i.setAttribute("id",r),this.element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&L["default"](i).addClass(nn);var s="function"==typeof this.config.placement?this.config.placement.call(this,i,this.element):this.config.placement,l=this._getAttachment(s);this.addAttachmentClass(l);var a=this._getContainer();L["default"](i).data(this.constructor.DATA_KEY,this),L["default"].contains(this.element.ownerDocument.documentElement,this.tip)||L["default"](i).appendTo(a),L["default"](this.element).trigger(this.constructor.Event.INSERTED),this._popper=new O["default"](this.element,i,this._getPopperConfig(l)),L["default"](i).addClass(rn),"ontouchstart"in document.documentElement&&L["default"](document.body).children().on("mouseover",null,L["default"].noop);var u=function u(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,L["default"](t.element).trigger(t.constructor.Event.SHOWN),e===tn&&t._leave(null,t)};if(L["default"](this.tip).hasClass(nn)){var c=Y.getTransitionDurationFromElement(this.tip);L["default"](this.tip).one(Y.TRANSITION_END,u).emulateTransitionEnd(c)}else u()}},e.hide=function l(e){var t=this,o=this.getTipElement(),n=L["default"].Event(this.constructor.Event.HIDE),i=function i(){t._hoverState!==en&&o.parentNode&&o.parentNode.removeChild(o),t._cleanTipClass(),t.element.removeAttribute("aria-describedby"),L["default"](t.element).trigger(t.constructor.Event.HIDDEN),null!==t._popper&&t._popper.destroy(),e&&e()};if(L["default"](this.element).trigger(n),!n.isDefaultPrevented()){if(L["default"](o).removeClass(rn),"ontouchstart"in document.documentElement&&L["default"](document.body).children().off("mouseover",null,L["default"].noop),this._activeTrigger[cn]=!1,this._activeTrigger[un]=!1,this._activeTrigger[an]=!1,L["default"](this.tip).hasClass(nn)){var r=Y.getTransitionDurationFromElement(o);L["default"](o).one(Y.TRANSITION_END,i).emulateTransitionEnd(r)}else i();this._hoverState=""}},e.update=function a(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function u(){return Boolean(this.getTitle())},e.addAttachmentClass=function c(e){L["default"](this.getTipElement()).addClass(Xo+"-"+e)},e.getTipElement=function f(){return this.tip=this.tip||L["default"](this.config.template)[0],this.tip},e.setContent=function h(){var e=this.getTipElement();this.setElementContent(L["default"](e.querySelectorAll(sn)),this.getTitle()),L["default"](e).removeClass(nn+" "+rn)},e.setElementContent=function p(e,t){"object"!=typeof t||!t.nodeType&&!t.jquery?this.config.html?(this.config.sanitize&&(t=F(t,this.config.whiteList,this.config.sanitizeFn)),e.html(t)):e.text(t):this.config.html?L["default"](t).parent().is(e)||e.empty().append(t):e.text(L["default"](t).text())},e.getTitle=function m(){var e=this.element.getAttribute("data-original-title");return e||(e="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),e},e._getPopperConfig=function b(e){var t=this;return D({},{placement:e,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:ln},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function o(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function n(e){return t._handlePopperPlacementChange(e)}},this.config.popperConfig)},e._getOffset=function y(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=D({},e.offsets,t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},e._getContainer=function v(){return!1===this.config.container?document.body:Y.isElement(this.config.container)?L["default"](this.config.container):L["default"](document).find(this.config.container)},e._getAttachment=function w(e){return Jo[e.toUpperCase()]},e._setListeners=function g(){var n=this;this.config.trigger.split(" ").forEach(function(e){if("click"===e)L["default"](n.element).on(n.constructor.Event.CLICK,n.config.selector,function(e){return n.toggle(e)});else if(e!==dn){var t=e===an?n.constructor.Event.MOUSEENTER:n.constructor.Event.FOCUSIN,o=e===an?n.constructor.Event.MOUSELEAVE:n.constructor.Event.FOCUSOUT;L["default"](n.element).on(t,n.config.selector,function(e){return n._enter(e)}).on(o,n.config.selector,function(e){return n._leave(e)})}}),this._hideModalHandler=function(){n.element&&n.hide()},L["default"](this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=D({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function x(){var e=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==e)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function _(e,t){var o=this.constructor.DATA_KEY;(t=t||L["default"](e.currentTarget).data(o))||(t=new this.constructor(e.currentTarget,this._getDelegateConfig()),L["default"](e.currentTarget).data(o,t)),e&&(t._activeTrigger["focusin"===e.type?un:an]=!0),L["default"](t.getTipElement()).hasClass(rn)||t._hoverState===en?t._hoverState=en:(clearTimeout(t._timeout),t._hoverState=en,t.config.delay&&t.config.delay.show?t._timeout=setTimeout(function(){t._hoverState===en&&t.show()},t.config.delay.show):t.show())},e._leave=function k(e,t){var o=this.constructor.DATA_KEY;(t=t||L["default"](e.currentTarget).data(o))||(t=new this.constructor(e.currentTarget,this._getDelegateConfig()),L["default"](e.currentTarget).data(o,t)),e&&(t._activeTrigger["focusout"===e.type?un:an]=!1),t._isWithActiveTrigger()||(clearTimeout(t._timeout),t._hoverState=tn,t.config.delay&&t.config.delay.hide?t._timeout=setTimeout(function(){t._hoverState===tn&&t.hide()},t.config.delay.hide):t.hide())},e._isWithActiveTrigger=function S(){for(var e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1},e._getConfig=function A(e){var t=L["default"](this.element).data();return Object.keys(t).forEach(function(e){-1!==Ko.indexOf(e)&&delete t[e]}),"number"==typeof(e=D({},this.constructor.Default,t,"object"==typeof e&&e?e:{})).delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),Y.typeCheckConfig($o,e,this.constructor.DefaultType),e.sanitize&&(e.template=F(e.template,e.whiteList,e.sanitizeFn)),e},e._getDelegateConfig=function R(){var e={};if(this.config)for(var t in this.config)this.constructor.Default[t]!==this.config[t]&&(e[t]=this.config[t]);return e},e._cleanTipClass=function C(){var e=L["default"](this.getTipElement()),t=e.attr("class").match(Qo);null!==t&&t.length&&e.removeClass(t.join(""))},e._handlePopperPlacementChange=function T(e){this.tip=e.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(e.placement))},e._fixTransition=function q(){var e=this.getTipElement(),t=this.config.animation;null===e.getAttribute("x-placement")&&(L["default"](e).removeClass(nn),this.config.animation=!1,this.hide(),this.show(),this.config.animation=t)},i._jQueryInterface=function E(n){return this.each(function(){var e=L["default"](this),t=e.data(Vo),o="object"==typeof n&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,o),e.data(Vo,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},N(i,null,[{key:"VERSION",get:function I(){return Po}},{key:"Default",get:function I(){return Zo}},{key:"NAME",get:function I(){return $o}},{key:"DATA_KEY",get:function I(){return Vo}},{key:"Event",get:function I(){return on}},{key:"EVENT_KEY",get:function I(){return zo}},{key:"DefaultType",get:function I(){return Go}}]),i}();L["default"].fn[$o]=fn._jQueryInterface,L["default"].fn[$o].Constructor=fn,L["default"].fn[$o].noConflict=function(){return L["default"].fn[$o]=Wo,fn._jQueryInterface};var hn="popover",pn="4.5.3",mn="bs.popover",bn="."+mn,yn=L["default"].fn[hn],vn="bs-popover",wn=new RegExp("(^|\\s)"+vn+"\\S+","g"),gn=D({},fn.Default,{placement:"right",trigger:"click",content:"",template:''}),xn=D({},fn.DefaultType,{content:"(string|element|function)"}),_n="fade",kn="show",Sn=".popover-header",An=".popover-body",Rn={HIDE:"hide"+bn,HIDDEN:"hidden"+bn,SHOW:"show"+bn,SHOWN:"shown"+bn,INSERTED:"inserted"+bn,CLICK:"click"+bn,FOCUSIN:"focusin"+bn,FOCUSOUT:"focusout"+bn,MOUSEENTER:"mouseenter"+bn,MOUSELEAVE:"mouseleave"+bn},Cn=function(e){function n(){return e.apply(this,arguments)||this}d(n,e);var t=n.prototype;return t.isWithContent=function o(){return this.getTitle()||this._getContent()},t.addAttachmentClass=function i(e){L["default"](this.getTipElement()).addClass(vn+"-"+e)},t.getTipElement=function r(){return this.tip=this.tip||L["default"](this.config.template)[0],this.tip},t.setContent=function s(){var e=L["default"](this.getTipElement());this.setElementContent(e.find(Sn),this.getTitle());var t=this._getContent();"function"==typeof t&&(t=t.call(this.element)),this.setElementContent(e.find(An),t),e.removeClass(_n+" "+kn)},t._getContent=function l(){return this.element.getAttribute("data-content")||this.config.content},t._cleanTipClass=function a(){var e=L["default"](this.getTipElement()),t=e.attr("class").match(wn);null!==t&&0=this._offsets[i]&&("undefined"==typeof this._offsets[i+1]||e
'};d.configure=function(e){var t,o;for(t in e)(o=e[t])!==undefined&&e.hasOwnProperty(t)&&(f[t]=o);return this},d.status=null,d.set=function(t){var e=d.isStarted();t=s(t,f.minimum,1),d.status=1===t?null:t;var o=d.render(!e),n=o.querySelector(f.barSelector),i=f.speed,r=f.easing;return o.offsetWidth,h(function(e){""===f.positionUsing&&(f.positionUsing=d.getPositioningCSS()),p(n,a(t,i,r)),1===t?(p(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout(function(){p(o,{transition:"all "+i+"ms linear",opacity:0}),setTimeout(function(){d.remove(),e()},i)},i)):setTimeout(e,i)}),this},d.isStarted=function(){return"number"==typeof d.status},d.start=function(){d.status||d.set(0);var e=function(){setTimeout(function(){d.status&&(d.trickle(),e())},f.trickleSpeed)};return f.trickle&&e(),this},d.done=function(e){return e||d.status?d.inc(.3+.5*Math.random()).set(1):this},d.inc=function(e){var t=d.status;return t?("number"!=typeof e&&(e=(1-t)*s(Math.random()*t,.1,.95)),t=s(t+e,0,.994),d.set(t)):d.start()},d.trickle=function(){return d.inc(Math.random()*f.trickleRate)},n=o=0,d.promise=function(e){return e&&"resolved"!==e.state()&&(0===n&&d.start(),o++,n++,e.always(function(){0==--n?(o=0,d.done()):d.set((o-n)/o)})),this},d.render=function(e){if(d.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=f.template;var o,n=t.querySelector(f.barSelector),i=e?"-100":l(d.status||0),r=document.querySelector(f.parent);return p(n,{transition:"all 0 linear",transform:"translate3d("+i+"%,0,0)"}),f.showSpinner||(o=t.querySelector(f.spinnerSelector))&&c(o),r!=document.body&&u(r,"nprogress-custom-parent"),r.appendChild(t),t},d.remove=function(){t(document.documentElement,"nprogress-busy"),t(document.querySelector(f.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&c(e)},d.isRendered=function(){return!!document.getElementById("nprogress")},d.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var h=function(){function t(){var e=o.shift();e&&e(t)}var o=[];return function(e){o.push(e),1==o.length&&t()}}(),p=function(){function t(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})}function o(e){var t=document.body.style;if(e in t)return e;for(var o,n=s.length,i=e.charAt(0).toUpperCase()+e.slice(1);n--;)if((o=s[n]+i)in t)return o;return e}function n(e){return e=t(e),i[e]||(i[e]=o(e))}function r(e,t,o){t=n(t),e.style[t]=o}var s=["Webkit","O","Moz","ms"],i={};return function(e,t){var o,n,i=arguments;if(2==i.length)for(o in t)(n=t[o])!==undefined&&t.hasOwnProperty(o)&&r(e,o,n);else r(e,i[1],i[2])}}();return d}),jQuery(function(){jQuery(document).on("page:fetch turbolinks:request-start",function(){NProgress.start()}),jQuery(document).on("page:receive turbolinks:request-end",function(){NProgress.set(.7)}),jQuery(document).on("page:change turbolinks:load",function(){NProgress.done()}),jQuery(document).on("page:restore turbolinks:request-end turbolinks:before-cache",function(){NProgress.remove()})});var _createClass=function(){function n(e,t){for(var o=0;o')}},{key:"render",value:function i(){var e;e=this.$growl(),this.$growls(this.settings.location).append(e),this.settings.fixed?this.present():this.cycle()}},{key:"bind",value:function r(e){var t=0"+this.settings.close+"\n
"+this.settings.title+"
\n
"+this.settings.message+"
"}},{key:"container",value:function g(e){return"
\n "+e+"\n
"}}]),o}()).settings={namespace:"growl",duration:3200,close:"×",location:"default",style:"default",size:"medium",delayOnHover:!0},o=t,this.Growl=o,x.growl=function(e){var t=0").addClass("guillotine-canvas")).css({width:100*this.width+"%",height:100*this.height+"%",top:0,left:0}),t=o.wrap(t).parent(),s=this.op.height/this.op.width*100+"%",(n=d("
").addClass("guillotine-window")).css({width:"100%",height:"auto","padding-top":s}),n=t.wrap(n).parent(),this.$el=o,this.el=o[0],this.$canvas=t,this.canvas=t[0],this.$gllt=n,this.gllt=n[0],this.$document=d(e.ownerDocument)},e.prototype._unwrap=function(){return this.$el.removeAttr("style"),this.$el.insertBefore(this.gllt),this.$gllt.remove()},e.prototype._init=function(){var e,t,o;return t=this.op.init,(o=parseFloat(t.scale))&&this._zoom(o),(e=parseInt(t.angle))&&this._rotate(e),this._offset(parseInt(t.x)/this.op.width||0,parseInt(t.y)/this.op.height||0)},e.prototype._start=function(e){if(this.enabled&&u(e))return e.preventDefault(),e.stopImmediatePropagation(),this.p=s(e),this._bind()},e.prototype._bind=function(){return this.$document.on(i.move,this._drag),this.$document.on(i.stop,this._unbind)},e.prototype._unbind=function(e){if(this.$document.off(i.move,this._drag),this.$document.off(i.stop,this._unbind),null!=e)return this._trigger("drag")},e.prototype._trigger=function(e){if(null!=this.op.eventOnChange&&this.$el.trigger(this.op.eventOnChange,[this.data,e]),"function"==typeof this.op.onChange)return this.op.onChange.call(this.el,this.data,e)},e.prototype._drag=function(e){var t,o,n,i,r;return e.preventDefault(),e.stopImmediatePropagation(),t=(i=s(e)).x-this.p.x,o=i.y-this.p.y,this.p=i,n=0===t?null:this.left-t/this.gllt.clientWidth,r=0===o?null:this.top-o/this.gllt.clientHeight,this._offset(n,r)},e.prototype._offset=function(e,t){if((e||0===e)&&(e<0&&(e=0),e>this.width-1&&(e=this.width-1),this.canvas.style.left=(100*-e).toFixed(2)+"%",this.left=e,this.data.x=Math.round(e*this.op.width)),t||0===t)return t<0&&(t=0),t>this.height-1&&(t=this.height-1),this.canvas.style.top=(100*-t).toFixed(2)+"%",this.top=t,this.data.y=Math.round(t*this.op.height)},e.prototype._zoom=function(e){var t,o,n,i,r;if(!(e<=0||1===e))return i=(r=[this.width,this.height])[0],t=r[1],1e||w[o].position.y>t)&&w.splice(o,1);var n=Math.round(f.width*f.height/s.density);if(n>w.length)for(;n>w.length;){var i=new a;w.push(i)}else nthis.stackPos;e--){var t=w[e],o=this.position.x-t.position.x,n=this.position.y-t.position.y;Math.sqrt(o*o+n*n).toFixed(2)e&&(this.position.x=0-this.parallaxOffsetX);break;default:(this.position.x+this.speed.x+this.parallaxOffsetX>e||this.position.x+this.speed.x+this.parallaxOffsetX<0)&&(this.speed.x=-this.speed.x)}switch(s.directionY){case"up":this.position.y+this.speed.y+this.parallaxOffsetY<0&&(this.position.y=t-this.parallaxOffsetY);break;case"down":this.position.y+this.speed.y+this.parallaxOffsetY>t&&(this.position.y=0-this.parallaxOffsetY);break;default:(this.position.y+this.speed.y+this.parallaxOffsetY>t||this.position.y+this.speed.y+this.parallaxOffsetY<0)&&(this.speed.y=-this.speed.y)}this.position.x+=this.speed.x,this.position.y+=this.speed.y},a.prototype.setStackPos=function(e){this.stackPos=e},e(),{option:u,destroy:c,start:o,pause:t}}var E="particleground",I=C.jQuery;C[E]=function(e,t){return new i(e,t)},C[E].defaults={minSpeedX:.1,maxSpeedX:.7,minSpeedY:.1,maxSpeedY:.7,directionX:"center",directionY:"center",density:1e4,dotColor:"#666666",lineColor:"#666666",particleRadius:7,lineWidth:1,curvedLines:!1,proximity:100,parallax:!0,parallaxMultiplier:5,onInit:function(){},onDestroy:function(){}},I&&(I.fn[E]=function(e){if("string"==typeof arguments[0]){var t,o=arguments[0],n=Array.prototype.slice.call(arguments,1);return this.each(function(){I.data(this,"plugin_"+E)&&"function"==typeof I.data(this,"plugin_"+E)[o]&&(t=I.data(this,"plugin_"+E)[o].apply(this,n))}),t!==undefined?t:this}if("object"==typeof e||!e)return this.each(function(){I.data(this,"plugin_"+E)||I.data(this,"plugin_"+E,new i(this,e))})})}(window,document),function(){for(var i=0,e=["ms","moz","webkit","o"],t=0;t"),t.innerHTML=i.html?i.text:y.escapeHtml(i.text||"").split("\n").join("
"),i.text&&y.show(t),i.customClass)y.addClass(r,i.customClass),r.setAttribute("data-custom-class",i.customClass);else{var s=r.getAttribute("data-custom-class");y.removeClass(r,s),r.setAttribute("data-custom-class","")}if(y.hide(r.querySelectorAll(".sa-icon")),i.type&&!m.isIE8()){var l=function(){for(var e=!1,t=0;t>1)+720)%360;--t;)n.h=(n.h+i)%360,r.push(T(n));return r},T.monochromatic=function(e,t){t=t||6;for(var o=T(e).toHsv(),n=o.h,i=o.s,r=o.v,s=[],l=1/t;t--;)s.push(T({h:n,s:i,v:r})),r=(r+l)%1;return s},T.readability=function(e,t){var o=T(e).toRgb(),n=T(t).toRgb(),i=(299*o.r+587*o.g+114*o.b)/1e3,r=(299*n.r+587*n.g+114*n.b)/1e3,s=Math.max(o.r,n.r)-Math.min(o.r,n.r)+Math.max(o.g,n.g)-Math.min(o.g,n.g)+Math.max(o.b,n.b)-Math.min(o.b,n.b);return{brightness:Math.abs(i-r),color:s}},T.readable=function(e,t){var o=T.readability(e,t);return 125'),a=x.minicolors.defaults;if(!t.data("minicolors-initialized")){if(e=x.extend(!0,{},a,e),l.addClass("minicolors-theme-"+e.theme).toggleClass("minicolors-with-opacity",e.opacity),e.position!==undefined&&x.each(e.position.split(" "),function(){l.addClass("minicolors-position-"+this)}),o="rgb"===e.format?e.opacity?"25":"20":e.keywords?"11":"7",t.addClass("minicolors-input").data("minicolors-initialized",!1).data("minicolors-settings",e).prop("size",o).wrap(l).after('
'),e.inline||(t.after(''),t.next(".minicolors-input-swatch").on("click",function(e){e.preventDefault(),t.focus()})),(r=t.parent().find(".minicolors-panel")).on("selectstart",function(){return!1}).end(),e.swatches&&0!==e.swatches.length)for(r.addClass("minicolors-with-swatches"),n=x('
    ').appendTo(r),s=0;s').appendTo(n).data("swatch-color",e.swatches[s]).find(".minicolors-swatch-color").css({backgroundColor:c(i),opacity:i.a}),e.swatches[s]=i;e.inline&&t.parent().addClass("minicolors-inline"),u(t,!1),t.data("minicolors-initialized",!0)}}function n(e){var t=e.parent();e.removeData("minicolors-initialized").removeData("minicolors-settings").removeProp("size").removeClass("minicolors-input"),t.before(e).remove()}function i(e){var t=e.parent(),o=t.find(".minicolors-panel"),n=e.data("minicolors-settings");!e.data("minicolors-initialized")||e.prop("disabled")||t.hasClass("minicolors-inline")||t.hasClass("minicolors-focus")||(r(),t.addClass("minicolors-focus"),o.stop(!0,!0).fadeIn(n.showSpeed,function(){n.show&&n.show.call(e.get(0))}))}function r(){x(".minicolors-focus").each(function(){var e=x(this),t=e.find(".minicolors-input"),o=e.find(".minicolors-panel"),n=t.data("minicolors-settings");o.fadeOut(n.hideSpeed,function(){n.hide&&n.hide.call(t.get(0)),e.removeClass("minicolors-focus")})})}function s(e,t,o){var n,i,r,s,l=e.parents(".minicolors").find(".minicolors-input"),a=l.data("minicolors-settings"),u=e.find("[class$=-picker]"),c=e.offset().left,d=e.offset().top,f=Math.round(t.pageX-c),h=Math.round(t.pageY-d),p=o?a.animationSpeed:0;t.originalEvent.changedTouches&&(f=t.originalEvent.changedTouches[0].pageX-c,h=t.originalEvent.changedTouches[0].pageY-d),f<0&&(f=0),h<0&&(h=0),f>e.width()&&(f=e.width()),h>e.height()&&(h=e.height()),e.parent().is( ".minicolors-slider-wheel")&&u.parent().is(".minicolors-grid")&&(n=75-f,i=75-h,r=Math.sqrt(n*n+i*i),(s=Math.atan2(i,n))<0&&(s+=2*Math.PI),75>16,g:(65280&e)>>8,b:255&e}}x.minicolors={defaults:{animationSpeed:50,animationEasing:"swing",change:null,changeDelay:0,control:"hue",defaultValue:"",format:"hex",hide:null,hideSpeed:100,inline:!1,keywords:"",letterCase:"lowercase",opacity:!1,position:"bottom left",show:null,showSpeed:100,theme:"default",swatches:[]}},x.extend(x.fn,{minicolors:function(e,t){switch(e){case"destroy":return x(this).each(function(){n(x(this))}),x(this);case"hide":return r(),x(this);case"opacity":return t===undefined?x(this).attr("data-opacity"):(x(this).each(function(){u(x(this).attr("data-opacity",t))}),x(this));case"rgbObject":return l(x(this),"rgbaObject"===e);case"rgbString":case"rgbaString":return a(x(this),"rgbaString"===e);case"settings":return t===undefined?x(this).data("minicolors-settings"):(x(this).each(function(){var e=x(this).data("minicolors-settings")||{};n(x(this)),x(this).minicolors(x.extend(!0,e,t))}),x(this));case"show":return i(x(this).eq(0)),x(this);case"value":return t===undefined?x(this).val():(x(this).each(function(){"object"==typeof t&&"null"!==t?(t.opacity&&x(this).attr("data-opacity",T(t.opacity,0,1)),t.color&&x(this).val(t.color)):x(this).val(t),u(x(this))}),x(this));default:return"create"!==e&&(t=e),x(this).each(function(){o(x(this),t)}),x(this)}}}),x([document]).on("mousedown.minicolors touchstart.minicolors",function(e){x(e.target).parents().add(e.target).hasClass("minicolors")||r()}).on("mousedown.minicolors touchstart.minicolors",".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider",function(e){var t=x(this);e.preventDefault(),x(e.delegateTarget).data("minicolors-target",t),s(t,e,!0)}).on("mousemove.minicolors touchmove.minicolors",function(e){var t=x(e.delegateTarget).data("minicolors-target");t&&s(t,e)}).on("mouseup.minicolors touchend.minicolors",function(){x(this).removeData("minicolors-target")}).on("click.minicolors",".minicolors-swatches li",function(e){e.preventDefault();var t=x(this),o=t.parents(".minicolors").find(".minicolors-input"),n=t.data("swatch-color");S(o,n,E(n)),u(o)}).on("mousedown.minicolors touchstart.minicolors",".minicolors-input-swatch",function(e){var t=x(this).parent().find(".minicolors-input");e.preventDefault(),i(t)}).on("focus.minicolors",".minicolors-input",function(){var e=x(this);e.data("minicolors-initialized")&&i(e)}).on("blur.minicolors",".minicolors-input",function(){var e,t,o,n,i,r=x(this),s=r.data("minicolors-settings");r.data("minicolors-initialized")&&(e=s.keywords?x.map(s.keywords.split(","),function(e){return x.trim(e.toLowerCase())}):[],i=""!==r.val()&&-1 span").css("opacity",n),r.val(i),""===r.val()&&r.val(C(s.defaultValue,!0)),r.val(_(r.val(),s.letterCase)))}).on("keydown.minicolors",".minicolors-input",function(e){var t=x(this);if(t.data("minicolors-initialized"))switch(e.keyCode){case 9:r();break;case 13:case 27:r(),t.blur()}}).on("keyup.minicolors",".minicolors-input",function(){var e=x(this);e.data("minicolors-initialized")&&u(e,!0)}).on("paste.minicolors",".minicolors-input",function(){var e=x(this);e.data("minicolors-initialized")&&setTimeout(function(){u(e,!0)},1)})}),function(){$(document).on("click","button[name=ab-comments]",function(){var e,t,o,n;switch(e=(t=$(this))[0].dataset.aId,n=t[0].dataset.state,o=$("#ab-comments-section-"+e),n){case"hidden":return o.slideDown(),t[0].dataset.state="shown";case"shown":return o.slideUp(),t[0].dataset.state="hidden"}}),$(document).on("keyup","input[name=ab-comment-new]",function(e){var o,t,n,i;if(i=$(this),o=i[0].dataset.aId,n=$("span#ab-comment-charcount-"+o),t=$("div[name=ab-comment-new-group][data-a-id="+o+"]"),13===e.which)return e.preventDefault(),160 '+n+"",t.button("loading"),r=function(){switch(e){case"smile":return n++,"/ajax/create_comment_smile";case"unsmile":return n--,"/ajax/destroy_comment_smile"}}(),i=!1,$.ajax({url:r,type:"POST",data:{id:o},success:function(e){return(i=e.success)&&$("span#ab-comment-smile-count-"+o).html(n),showNotification(e.message,e.success)},error:function(e,t,o){return console.log(e,t,o),showNotification(translate("frontend.error.message"),!1)},complete:function(){return t.button("reset"),window.setTimeout(function(){if(i)switch(e){case"smile":return t[0].dataset.action="unsmile",t.html(' '+n+"");case"unsmile":return t[0].dataset.action="smile",t.html(' '+n+"")}},20)}})})}.call(this),function(){$(document).on("click","a[data-action=ab-destroy]",function(e){var t,o;return e.preventDefault(),o=$(this),t=o[0].dataset.aId,swal({title:translate("frontend.destroy_question.confirm.title"),text:translate("frontend.destroy_question.confirm.text"),type:"warning",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:translate("views.actions.y"),cancelButtonText:translate("views.actions.n"),closeOnConfirm:!0},function(){return $.ajax({url:"/ajax/destroy_answer",type:"POST",data:{answer:t},success:function(e){return e.success&&$("div.answerbox[data-id="+t+"]").slideUp(),showNotification(e.message,e.success)},error:function(e,t,o){return console.log(e,t,o),showNotification(translate("frontend.error.message"),!1)},complete:function(){}})})})}.call(this),function(){$(document).on("click","a[data-action=ab-report]",function(e){var t,o;return e.preventDefault(),t=(o=$(this))[0].dataset.aId,reportDialog("answer",t,function(){return o.button("reset")})})}.call(this),function(){$(document).on("click","button[name=ab-smile]",function(){var e,t,o,n,i,r;return o=$(this),t=o[0].dataset.aId,e=o[0].dataset.action,n=Number($("span#ab-smile-count-"+t).html()),o[0].dataset.loadingText=' '+n+"",o.button("loading"),r=function(){switch(e){case"smile":return n++,"/ajax/create_smile";case"unsmile":return n--,"/ajax/destroy_smile"}}(),i=!1,$.ajax({url:r,type:"POST",data:{id:t},success:function(e){return(i=e.success)&&$("span#ab-smile-count-"+t).html(n),showNotification(e.message,e.success)},error:function(e,t,o){return console.log(e,t,o),showNotification(translate("frontend.error.message"),!1)},complete:function(){return o.button("reset"),window.setTimeout(function(){if(i)switch(e){case"smile":return o[0].dataset.action="unsmile",o.html(' '+n+"");case"unsmile":return o[0].dataset.action="smile",o.html(' '+n+"")}},20)}})})}.call(this),function(){$(document).on("click","a[data-action=ab-submarine]",function(e){var t,o,n,i;return e.preventDefault(),t=(o=$(this))[0].dataset.aId,"yes"===o[i=0].dataset.torpedo&&(i=1),n="subscribe",0===i&&(n="un"+n),$.ajax({url:"/ajax/"+n,type:"POST",data:{answer:t},success:function(e){return e.success?(o[0].dataset.torpedo=["yes","no"][i],o[0].children[0].nextSibling.textContent=i?translate("views.actions.unsubscribe"):translate("views.actions.subscribe"),showNotification(translate("frontend.subscription."+n),!0)):showNotification(translate("frontend.subscription.fail."+n),!1)},error:showNotificationXHRError,complete:function(){}})})}.call(this),function(){$(document).on("click","button[name=qb-all-ask]",function(){var e;return(e=$(this)).button("loading"),$("textarea[name=qb-all-question]").attr("readonly","readonly"),$.ajax({url:"/ajax/ask",type:"POST",data:{rcpt:"followers",question:$("textarea[name=qb-all-question]").val(),anonymousQuestion:!1},success:function(e){return e.success&&($("textarea[name=qb-all-question]").val(""),$("#modal-ask-followers").modal("hide")),showNotification(e.message,e.success)},error:function(e,t,o){return console.log(e,t,o),showNotification(translate("frontend.error.message"),!1)},complete:function(){return e.button("reset"),$("textarea[name=qb-all-question]").removeAttr("readonly")}})}),$(document).on("keydown",function(e){if(77===e.keyCode&&(e.ctrlKey||e.metaKey))return $(".btn[name=toggle-all-ask]").trigger("click")}),$(document).on("keydown","textarea[name=qb-all-question]",function(e){if(13===e.keyCode&&(e.ctrlKey||e.metaKey))return $("button[name=qb-all-ask]").trigger("click")})}.call(this),function(){$(document).on("click","a[data-action=ab-question-destroy]",function(e){var t,o;return e.preventDefault(),t=$(this),o=t[0].dataset.qId,swal({title:translate("frontend.destroy_own.confirm.title"),text:translate("frontend.destroy_own.confirm.text"),type:"warning",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:translate("views.actions.y"),cancelButtonText:translate("views.actions.n"),closeOnConfirm:!0},function(){return $.ajax({url:"/ajax/destroy_question",type:"POST",data:{question:o},success:function(e){return e.success&&(void 0!==t[0].dataset.redirect?window.location.pathname=t[0].dataset.redirect:$("div.answerbox[data-q-id="+o+"], div.questionbox[data-id="+o+"]").slideUp()),showNotification(e.message,e.success)},error:function(e,t,o){return console.log(e,t,o),showNotification(translate("frontend.error.message"),!1)},complete:function(){}})})})}.call(this),function(){$(document).on("click","a[data-action=ab-question-report]",function(e){var t,o;return e.preventDefault(),o=(t=$(this))[0].dataset.qId,reportDialog("question",o,function(){return t.button("reset")})})}.call(this),function(){$(document).on("click","button[name=qb-ask]",function(){var e,t,o;return(t=$(this)).button("loading"),o="true"===t[0].dataset.promote,$("textarea[name=qb-question]").attr("readonly","readonly"),e=void 0===$("input[name=qb-anonymous]")[0]||$("input[name=qb-anonymous]")[0].checked,$.ajax({url:"/ajax/ask",type:"POST",data:{rcpt:$("input[name=qb-to]").val(),question:$("textarea[name=qb-question]").val(),anonymousQuestion:e},success:function(e){return e.success&&($("textarea[name=qb-question]").val(""),o&&($("div#question-box").hide(),$("div#question-box-promote").show())),showNotification(e.message,e.success)},error:function(e,t,o){return console.log(e,t,o),showNotification(translate("frontend.error.message"),!1)},complete:function(){return t.button("reset"),$("textarea[name=qb-question]").removeAttr("readonly")}})}),$(document).on("click","button#new-question",function(){return $("div#question-box").show(),$("div#question-box-promote").hide()}),$(document).on("keydown","textarea[name=qb-question]",function(e){if(13===e.keyCode&&e.ctrlKey)return $("button[name=qb-ask]").trigger("click")})}.call(this),function(){$(document).on("click","input[type=checkbox][name=gm-list-check]",function(){var n,t,o,i;return(n=$(this)).attr("disabled","disabled"),i=n[0].dataset.list,o=Number($("span#"+i+"-members").html()),t=n[0].checked,o+=t?1:-1,$.ajax({url:"/ajax/list_membership",type:"POST",data:{user:n[0].dataset.user,list:i,add:t},success:function(e){return e.success&&(n[0].checked=null!=e.checked?e.checked:!t,$("span#"+i+"-members").html(o)),showNotification(e.message,e.success)},error:function(e,t,o){return n[0].checked=!1,console.log(e,t,o),showNotification(translate("frontend.error.message"),!1)},complete:function(){return n.removeAttr("disabled")}})}),$(document).on("keyup","input#new-list-name",function(e){if(13===e.which)return e.preventDefault(),$("button#create-list").trigger("click")}),$(document).on("click","button#create-list",function(){var e,t;return(e=$(this)).button("loading"),t=$("input#new-list-name"),$.ajax({url:"/ajax/create_list",type:"POST",data:{name:t.val(),user:e[0].dataset.user},dataType:"json",success:function(e){return e.success&&($("#lists-list ul.list-group").append(e.render),t.val("")),showNotification(e.message,e.success)},error:function(e,t,o){return console.log(e,t,o),showNotification(translate("frontend.error.message"),!1)},complete:function(){return e.button("reset")}})}),$(document).on("click","a#delete-list",function(e){var t,o;return e.preventDefault(),t=$(this),o=t[0].dataset.list,swal({title:translate("frontend.list.title"),text:translate("frontend.list.text"),type:"warning",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:translate("views.actions.delete"),cancelButtonText:translate("views.actions.cancel"),closeOnConfirm:!0},function(){return $.ajax({url:"/ajax/destroy_list",type:"POST",data:{list:o},dataType:"json",success:function(e){return e.success&&$("li.list-group-item#list-"+o).slideUp(),showNotification(e.message,e.success)},error:function(e,t,o){return console.log(e,t,o),showNotification(translate("frontend.error.message"),!1)},complete:function(){}})})})}.call(this),function(){$(document).on("click","button#ib-generate-question",function(){var e;return(e=$(this)).button("loading"),$.ajax({url:"/ajax/generate_question",type:"POST",dataType:"json",success:function(e){var t;if(e.success)return $("div#entries").prepend(e.render),(t=null!=document.getElementById("ib-delete-all")?$("button#ib-delete-all"):$("button#ib-delete-all-author")).removeAttr("disabled"),t[0].dataset.ibCount=Number(t[0].dataset.ibCount)+1},error:function(e,t,o){return console.log(e,t,o),showNotification(translate("frontend.error.message"),!1)},complete:function(){return e.button("reset")}})}),$(document).on("click","button#ib-author",function(){return $("#author-form").submit(function(){var e;return e=$("#author").val(),window.location.href="/inbox/"+e,!1})}),$(document).on("click","button#ib-delete-all",function(){var e,t;return t=(e=$(this))[0].dataset.ibCount,swal({title:translate("frontend.inbox.confirm_all.title",{count:t}),text:translate("frontend.inbox.confirm_all.text"),type:"warning",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:translate("views.actions.delete"),cancelButtonText:translate("views.actions.cancel"),closeOnConfirm:!0},function(){var o;return e.button("loading"),o=!1,$.ajax({url:"/ajax/delete_all_inbox",type:"POST",dataType:"json",success:function(e){var t;if(e.success)return o=!0,$("div#pagination, button#load-more-btn").slideUp(),(t=$("div#entries")).slideUp(400,function(){return t.html("Nothing to see here."),t.fadeIn()})},error:function(e,t,o){return console.log(e,t,o),showNotification(translate("frontend.error.message"),!1)},complete:function(){if(o)return e.html(e.data("resetText")),e.removeClass("disabled"),e[0].dataset.ibCount=0}})})}),$(document).on("click","button#ib-delete-all-author",function(){var e,t;return t=(e=$(this))[0].dataset.ibCount,swal({title:translate("frontend.inbox.confirm_all.title",{count:t}),text:translate("frontend.inbox.confirm_all.text"),type:"warning",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:translate("views.actions.delete"),cancelButtonText:translate("views.actions.cancel"),closeOnConfirm:!0},function(){var o;return e.button("loading"),o=!1,$.ajax({url:"/ajax/delete_all_inbox/"+location.pathname.split("/")[2],type:"POST",dataType:"json",success:function(e){var t;if(e.success)return o=!0,$("div#pagination, button#load-more-btn").slideUp(),(t=$("div#entries")).slideUp(400,function(){return t.html("Nothing to see here."),t.fadeIn()})},error:function(e,t,o){return console.log(e,t,o),showNotification(translate("frontend.error.message"),!1)},complete:function(){if(o)return e.html(e.data("resetText")),e.removeClass("disabled"),e[0].dataset.ibCount=0}})})}),$(document).on("keydown","textarea[name=ib-answer]",function(e){var t;if(t=$(this)[0].dataset.id,13===e.keyCode&&(e.ctrlKey||e.metaKey))return $("button[name=ib-answer][data-ib-id="+t+"]").trigger("click")}),$(document).on("click","button[name=ib-answer]",function(){var e,t,o;return(e=$(this)).button("loading"),t=e[0].dataset.ibId,$("textarea[name=ib-answer][data-id="+t+"]").attr("readonly","readonly"),o=[],$("input[type=checkbox][name=ib-share][data-ib-id="+t+"]:checked").each(function(e,t){return o.push(t.dataset.service)}),$.ajax({url:"/ajax/answer",type:"POST",data:{id:t,answer:$("textarea[name=ib-answer][data-id="+t+"]").val(),share:JSON.stringify(o),inbox:!0},success:function(e){return e.success&&$("div.inbox-entry[data-id="+t+"]").slideUp(),showNotification(e.message,e.success)},error:function(e,t,o){return console.log(e,t,o),showNotification(translate("frontend.error.message"),!1)},complete:function(){return e.button("reset"),$("textarea[name=ib-answer][data-id="+t+"]").removeAttr("readonly")}})}),$(document).on("click","button[name=ib-destroy]",function(){var e;return e=$(this),swal({title:translate("frontend.inbox.confirm.title"),text:translate("frontend.inbox.confirm.text"),type:"warning",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:translate("views.actions.delete"),cancelButtonText:translate("views.actions.cancel"),closeOnConfirm:!0},function(){var o;return e.button("loading"),o=e[0].dataset.ibId,$("textarea[name=ib-answer][data-id="+o+"]").attr("readonly","readonly"),$.ajax({url:"/ajax/delete_inbox",type:"POST",data:{id:o},success:function(e){var t;return e.success&&($("div.inbox-entry[data-id="+o+"]").slideUp(),(t=null!=document.getElementById("ib-delete-all")?$("button#ib-delete-all"):$("button#ib-delete-all-author")).removeAttr("disabled"),t[0].dataset.ibCount=Number(t[0].dataset.ibCount)-1),showNotification(e.message,e.success)},error:function(e,t,o){return console.log(e,t,o),showNotification(translate("frontend.error.message"),!1)},complete:function(){return e.button("reset"),$("textarea[name=ib-answer][data-id="+o+"]").removeAttr("readonly")}})})}),$(document).on("click","button[name=ib-options]",function(){var e,t,o,n;switch(t=(e=$(this))[0].dataset.ibId,n=e[0].dataset.state,o=$("#ib-options-"+t),n){case"hidden":return o.slideDown(),e[0].dataset.state="shown";case"shown":return o.slideUp(),e[0].dataset.state="hidden"}})}.call(this),function(){cheet("up up down down left right left right b a",function(){return $("body").addClass("fa-spin"),$("p.answerbox__question-text").each(function(){return $(this).html(":^)")})})}.call(this),function(){$(document).ready(function(){return $('[data-toggle="tooltip"]').tooltip()})}.call(this),function(){jQuery(function(){var o;if(0<$("#pagination").length)return $("#pagination").hide(),o=!1,$("#load-more-btn").show().click(function(){var e,t;o||(o=!0,t=$("#pagination .pagination .next a").attr("href"),(e=$(this)).html('').addClass("disabled"),$.getScript(t,function(){return e&&e.text("Load more").removeClass("disabled"),o=!1,$('[data-toggle="tooltip"]').tooltip()}))})})}.call(this),function(){$(document).on("keydown","textarea#q-answer-text",function(e){if($(this)[0].dataset.id,13===e.keyCode&&e.ctrlKey)return $("button#q-answer-btn").trigger("click")}),$(document).on("click","button#q-answer-btn",function(){var e,t,o;return(e=$(this)).button("loading"),t=e[0].dataset.qId,$("textarea#q-answer-text").attr("readonly","readonly"),o=[],$("input[type=checkbox][name=share][data-q-id="+t+"]:checked").each(function(e,t){return o.push(t.dataset.service)}),$.ajax({url:"/ajax/answer",type:"POST",dataType:"json",data:{id:t,answer:$("textarea#q-answer-text[data-id="+t+"]").val(),share:JSON.stringify(o),inbox:!1},success:function(e){return e.success&&($("div#q-answer-box").slideUp(),$("div#answers").prepend(e.render)),showNotification(e.message,e.success)},error:function(e,t,o){return console.log(e,t,o),showNotification(translate("frontend.error.message"),!1)},complete:function(){return e.button("reset"),$("textarea#q-answer-text").removeAttr("readonly")}})})}.call(this),function(){var i,e,r,s,l,o,t,n;$(document).on("submit","form#edit_user",function(e){if(0===$("input#user_current_password").val().length)return e.preventDefault(),$("button[data-target=#modal-passwd]").trigger("click")}),t=function(e,t){var o;return(o=new FileReader).addEventListener("load",function(e){return t(e.target.result)}),o.readAsBinaryString(e)},i=function(){},null==window.URL&&null==window.webkitURL||(t=function(e,t){return t((window.URL||window.webkitURL).createObjectURL(e))},i=function(e){return URL.revokeObjectURL(e)}),$(document).on("change","input#user_profile_picture[type=file]",function(){var e;return e=this,$("#profile-picture-crop-controls").slideUp(400,function(){if(e.files&&e.files[0])return t(e.files[0],function(t){var o,n;return o=$("#profile-picture-cropper"),$("#profile-picture-preview"),n=function(e){return $("#profile_picture_x").val(Math.floor(e.x/e.scale)),$("#profile_picture_y").val(Math.floor(e.y/e.scale)),$("#profile_picture_w").val(Math.floor(e.w/e.scale)),$("#profile_picture_h").val(Math.floor(e.h/e.scale))},o.on("load",function(){var e;return"[object URL]"==={}.toString.call(t)&&i(t),e=o[0].naturalWidth>o[0].naturalHeight?o[0].naturalHeight:o[0].naturalWidth,o.guillotine({width:e,height:e,onChange:n}),n(o.guillotine("getData"),"drag"),null==$("#profile-picture-crop-controls")[0].dataset.bound&&($("#cropper-zoom-out").click(function(){return o.guillotine("zoomOut")}),$("#cropper-zoom-in").click(function(){return o.guillotine("zoomIn")}),$("#profile-picture-crop-controls")[0].dataset.bound=!0),$("#profile-picture-crop-controls").slideDown()}),o.attr("src",t)})})}),$(document).on("change","input#user_profile_header[type=file]",function(){var e;return e=this,$("#profile-header-crop-controls").slideUp(400,function(){if(e.files&&e.files[0])return t(e.files[0],function(e){var t,o;return t=$("#profile-header-cropper"),$("#profile-header-preview"),o=function(e){return $("#profile_header_x").val(Math.floor(e.x/e.scale)),$("#profile_header_y").val(Math.floor(e.y/e.scale)),$("#profile_header_w").val( Math.floor(e.w/e.scale)),$("#profile_header_h").val(Math.floor(e.h/e.scale))},t.on("load",function(){return"[object URL]"==={}.toString.call(e)&&i(e),t.guillotine({width:1500,height:350,onChange:o}),o(t.guillotine("getData"),"drag"),null==$("#profile-header-crop-controls")[0].dataset.bound&&($("#cropper-header-zoom-out").click(function(){return t.guillotine("zoomOut")}),$("#cropper-header-zoom-in").click(function(){return t.guillotine("zoomIn")}),$("#profile-header-crop-controls")[0].dataset.bound=!0),$("#profile-header-crop-controls").slideDown()}),t.attr("src",e)})})}),l=null,$(document).ready(function(){var t;return l=document.createElement("style"),document.body.appendChild(l),t=null,$("#update_theme .color").each(function(){var e;return e=$(this),this.value="#"+s(this.value),e.minicolors({control:"hue",defaultValue:this.value,letterCase:"lowercase",position:"bottom left",theme:"bootstrap",inline:!1,change:function(){return clearTimeout(t),t=setTimeout(o,1e3)}})}),!0}),$(document).on("click","a.theme_preset",function(){var e;return e=[].concat(n[this.dataset.preset]),$("#update_theme .color").each(function(){return $(this).minicolors("value","#"+s(e.shift()))})}),o=function(){var t;return t={},$("#update_theme").find(".color").each(function(){var e;return e=this.name.substr(6,this.name.length-7),t[e]=parseInt(this.value.substr(1,6),16)}),e(t),null},e=function(o){var n,i;return i={primary_color:"primary",primary_text:"primary-text",danger_color:"danger",danger_text:"danger-text",warning_color:"warning",warning_text:"warning-text",info_color:"info",info_text:"info-text",success_color:"success",success_text:"success-text",dark_color:"dark",dark_text:"dark-text",light_color:"light",light_text:"light-text",raised_background:"raised-bg",raised_accent:"raised-accent",background_color:"background",body_text:"body-text",input_color:"input-bg",input_text:"input-text",muted_text:"muted-text"},n=":root {\n",Object.keys(o).forEach(function(e){var t;if(i[e])return i[e].includes("text")?(t=s(o[e]),n+="--"+i[e]+": "+r(t)+";\n"):n+="--"+i[e]+": #"+s(o[e])+";\n"}),n+="}",l.innerHTML=n},s=function(e){return("000000"+parseInt(e).toString(16)).substr(-6,6)},r=function(e){return e.match(/.{1,2}/g).map(function(e){return parseInt(e,16)}).join(", ")},n={rs:[6174129,16777215,16711737,16777215,4175384,16777215,16741656,16777215,10048699,16777215,2236962,15658734,16382457,1381653,6174129,16777215,2236962,12303291,16777215,0,6174129],dc:[1315860,15658734,3547682,15658734,1912349,15658734,4210752,15658734,12105912,3881787,3158064,15658734,2105376,15658734,10263194,3552822,15132390,12303291,3684408,15461355,7894646],lc:[15461355,1118481,16212835,1118481,9109396,1118481,16760191,1118481,4671303,12895428,13619151,1118481,14671839,1118481,6514021,13224393,1644825,4473924,13092807,1315860,8882569]},$(document).on("submit","#update_theme",function(){return $(this).find(".color").each(function(){return this.value=parseInt(this.value.substr(1,6),16)}),!0})}.call(this),function(){var e,o,t;$(document).on("click","button[name=user-action]",function(){var e,t,o,n,i,r,s;return(t=$(this)).button("loading"),s=t[0].dataset.type,i=t[0].dataset.target,e=t[0].dataset.action,"follower"!==s&&"friend"!==s||(o=Number($("h4.entry-text#"+s+"-count").html())),r=function(){switch(e){case"follow":return o++,"/ajax/create_friend";case"unfollow":return o--,"/ajax/destroy_friend"}}(),n=!1,$.ajax({url:r,type:"POST",data:{screen_name:i},success:function(e){return n=e.success,e.success&&("follower"!==s&&"friend"!==s||$("h4.entry-text#"+s+"-count").html(o)),showNotification(e.message,e.success)},error:function(e,t,o){return console.log(e,t,o),showNotification(translate("frontend.error.message"),!1)},complete:function(){if(t.button("reset"),n)switch(e){case"follow":return t[0].dataset.action="unfollow",t.attr("class","btn btn-default btn-block profile--follow-btn"),t.html(translate("views.actions.unfollow"));case"unfollow":return t[0].dataset.action="follow",t.attr("class","btn btn-primary btn-block profile--follow-btn"),t.html(translate("views.actions.follow"))}}})}),$(document).on("click","a[data-action=report-user]",function(e){var t,o;return e.preventDefault(),o=(t=$(this))[0].dataset.target,reportDialog("user",o,function(){return t.button("reset")})}),t=null,"string"==typeof document.documentElement.style.webkitTransform&&(t="webkit"),"string"==typeof document.documentElement.style.mozTransform&&(t="moz"),"string"==typeof document.documentElement.style.oTransform&&(t="o"),"string"==typeof document.documentElement.style.msTransform&&(t="ms"),"string"==typeof document.documentElement.style.khtmlTransform&&(t="khtml"),"string"==typeof document.documentElement.style.transform&&(t=""),(e=null)!=t&&(o="transform",t.length&&(o=t+o.charAt(0).toUpperCase()+o.slice(1)),window.HEADER_PARALLAX_INERTIA=.4,e=function(){var e,t;null!=(e=$("#profile--header:not(.profile--no-header) img")[0])&&(t=Math.max(window.pageYOffset,window.scrollY,document.documentElement.scrollTop)*HEADER_PARALLAX_INERTIA,e.style[o]="translate3d(0px, "+t+"px, 0px)")},$(window).on("scroll",function(){e()})),$(document).ready(function(){null!=e&&e()})}.call(this),function(){window.reportDialog=function(o,n,i){return swal({title:translate("frontend.report.confirm.title",{type:o}),text:translate("frontend.report.confirm.text"),type:"input",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:translate("views.actions.report"),cancelButtonText:translate("views.actions.cancel"),closeOnConfirm:!0,inputPlaceholder:translate("frontend.report.confirm.input")},function(e){return("boolean"!=typeof e||!1!==e)&&$.ajax({url:"/ajax/report",type:"POST",data:{id:n,type:o,reason:e},success:function(e){return showNotification(e.message,e.success)},error:function(e,t,o){return console.log(e,t,o),showNotification(translate("frontend.error.message"),!1)},complete:function(e,t){return i(o,n,e,t)}})})}}.call(this),function(){$(document).on("click","#locale-switch",function(e){return e.preventDefault(),$("#locales-panel").slideToggle(),$("html, body").animate({scrollTop:$(document).height()},1e3)})}.call(this),function(){window.doppler=function(e,t,o){var n,i,r,s,l,a,u,c,d;for(null==o&&(o=!1);1<=e;)e/=10;if(i=[(c=tinycolor(t).toRgb()).r,c.g,c.b],o)for(r=s=0,a=i.length;s